﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using IToursDataService;

namespace ToursDataService
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码、svc 和配置文件中的类名“AccountService”。
    public class GuestComments : IGuestComments //, IAccountXmlService
    {
        public List<Account> GetAccountData()
        {
            return MockAccount.AccountList;
        }
        public Account GetAccount(string age)
        {
            Account account=MockAccount.AccountList[0];
            foreach (Account a in MockAccount.AccountList)
            {
                if (age == a.Age.ToString())
                    account = a;
            }
            return account;

        }
        public bool SaveAccount(Account account)
        {
            MockAccount.AccountList.Add(account);
            return true;
        }
        public string SendMessage(string Message)
        {
            return " Message:" + Message;
        }
    }
}
